

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>下单结算</title>
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>views/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>views/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>views/css/main.css" />
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>views/css/shop.css" />
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>views/css/square/red.css" />
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>views/css/user.css" />
<script type="text/javascript"
	src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
	/* function initconfig() {
		setTimeout(function() {
			wx.config({
				debug : false,
				appId : 'wx177d4c8b355354b9',
				timestamp : '1481817752',
				nonceStr : 'Wm3WZYTPz0wzccnW',
				signature : '966dabb25480553cdde61f13b20f07bdb9edd25d',
				jsApiList : [ 'onMenuShareTimeline', 'onMenuShareAppMessage',
						'onMenuShareQQ', 'onMenuShareWeibo',
						'onMenuShareQZone', 'chooseImage', 'previewImage',
						'uploadImage' ]
			});
		}, 1);
		var pblWXShare = true;
		wx.ready(function() {
			setWXShare();
			if (pblWXShare)
				$('.swiper-share').slideDown(1500);

		});
		wx.error(function(res) {

			pblWXShare = false;
		});
	}
	function setWXShare() {
		wx
				.onMenuShareTimeline({
					title : 'U牌玩精油',
					link : 'http://webChat.5288168.com/ShopCenter/ShopHomepage.aspx?State=100008&ReferMemberId=1000083001009177',
					imgUrl : 'http://www.5288168.com:8080/Attachment/Temp/b9d49555-d6bb-4c76-b547-e9c760bee3cb.jpg',
					success : function() {
					},
					cancel : function() {
					}
				});
		wx
				.onMenuShareAppMessage({
					title : 'U牌玩精油',
					desc : 'From italy，50年专注精油，CAAQ国际权威有机认证，CE认证！对于U牌而言，品质是不容触碰的底线，除此之外，一切放开玩！【U牌玩精油】、【U-face】芳疗护肤、【U-WM】私密养护系列，三大系列火爆持续中！',
					link : 'http://webChat.5288168.com/ShopCenter/ShopHomepage.aspx?State=100008&ReferMemberId=1000083001009177',
					imgUrl : 'http://www.5288168.com:8080/Attachment/Temp/b9d49555-d6bb-4c76-b547-e9c760bee3cb.jpg',
					type : '',
					dataUrl : '',
					success : function() {
					},
					cancel : function() {
					}
				});
		wx
				.onMenuShareQQ({
					title : 'U牌玩精油',
					desc : 'From italy，50年专注精油，CAAQ国际权威有机认证，CE认证！对于U牌而言，品质是不容触碰的底线，除此之外，一切放开玩！【U牌玩精油】、【U-face】芳疗护肤、【U-WM】私密养护系列，三大系列火爆持续中！',
					link : 'http://webChat.5288168.com/ShopCenter/ShopHomepage.aspx?State=100008&ReferMemberId=1000083001009177',
					imgUrl : 'http://www.5288168.com:8080/Attachment/Temp/b9d49555-d6bb-4c76-b547-e9c760bee3cb.jpg',
					success : function() {
					},
					cancel : function() {
					}
				});
		wx
				.onMenuShareWeibo({
					title : 'U牌玩精油',
					desc : 'From italy，50年专注精油，CAAQ国际权威有机认证，CE认证！对于U牌而言，品质是不容触碰的底线，除此之外，一切放开玩！【U牌玩精油】、【U-face】芳疗护肤、【U-WM】私密养护系列，三大系列火爆持续中！',
					link : 'http://webChat.5288168.com/ShopCenter/ShopHomepage.aspx?State=100008&ReferMemberId=1000083001009177',
					imgUrl : 'http://www.5288168.com:8080/Attachment/Temp/b9d49555-d6bb-4c76-b547-e9c760bee3cb.jpg',
					success : function() {
					},
					cancel : function() {
					}
				});
		wx
				.onMenuShareQZone({
					title : 'U牌玩精油',
					desc : 'From italy，50年专注精油，CAAQ国际权威有机认证，CE认证！对于U牌而言，品质是不容触碰的底线，除此之外，一切放开玩！【U牌玩精油】、【U-face】芳疗护肤、【U-WM】私密养护系列，三大系列火爆持续中！',
					link : 'http://webChat.5288168.com/ShopCenter/ShopHomepage.aspx?State=100008&ReferMemberId=1000083001009177',
					imgUrl : 'http://www.5288168.com:8080/Attachment/Temp/b9d49555-d6bb-4c76-b547-e9c760bee3cb.jpg',
					success : function() {
					},
					cancel : function() {
					}
				});
	}

	initconfig(); */
</script>
</head>
<body>
	<form style="display: none;" id="dataform">
		<input type="text" value="${apiDingDan.titles}" name="ordertitle"
			id="ordertitle"> <input type="text"
			value="${apiDingDan.zf_type}" name="payType" id="payType"> <input
			type="text" value="${apiDingDan.sendFee}" name="sendfee" id="sendfee">
		<input type="text" value="${apiDingDan.money}" name="sumPrice"
			id="sumPrice">
	</form>
	<div class="mwrap">
		<!--订单编号b -->
		<!-- <div class="border_box" id="divOrderNo">
			<div class="h3_item box_con">
				<div class="useAccount">订单编号：0000000000001</div>
			</div>
		</div> -->
		<!--订单编号e -->
		<!--所购商品b -->
		<div class="border_box">
			<div class="goods-box">
				<ul id="ulProductInfo">
					<c:forEach items="${car}" var="carinfo">
						<li><div class="goods-list">
								<div class="pic">
									<a href="#"><img
										src="<%=imagePath %>${carinfo.goods.image}"></a>
								</div>
								<div class="info">
									<div class="goods-name">
										<a href="#">${carinfo.goods.name}</a>
									</div>
									<div>
										<a class="goods-price word-color">￥${carinfo.product.price}</a>
										<span class="goods-amount">×${carinfo.count}</span>
									</div>
								</div>
							</div>
							<div class="clear"></div></li>
					</c:forEach>
				</ul>
			</div>
		</div>
		<!--所购商品e -->

		<!--金额b -->
		<div class="border_box" style="margin-top: -1px">
			<div class="h3_item box_con">
				<div class="useAccount" id="divTotalPriceInfo">
					快递费用:<span class="word-color">${apiDingDan.sendFee}</span><label>元</label>&nbsp;&nbsp;&nbsp;订单总价(含运费):<span
						class="word-color">${apiDingDan.money}</span>元
				</div>
			</div>
		</div>
		<!--金额e -->

		<!--用户地址信息 -->
		<div class="mt10">
			<div class="border_box ">
				<div class="list-group-new" id="divOrderInfo">
					<ul>
						<li><label>收件人：</label><span>${apiDingDan.name}</span><span
							class="pull-right">${apiDingDan.mobile}</span><br> <label>收货地址：</label><span>${apiDingDan.address}</span></li>
					</ul>
				</div>
			</div>
		</div>
		<!--支付方式 -->
		<div class="mt10">
			<div class="border_box ">
				<div class="list-group-new">
					<ul>	
						<li>					
							<label><input type="radio" name="pay" id="inlineRadio2" value="2" checked> 微支付</label>	
						</li>						
					</ul>
				</div>
			</div>
		</div>
		
	</div>
	<div class="buySection">
		<!-- <button type="button" id="btnSubmit" class="btn btn-block btn-color ">
		</button> -->
		<button type="button" onclick="pay()" class="btn btn-block btn-color ">确认支付
		</button>
	</div>
	<script type="text/javascript"
		src="<%=basePath%>views/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript"
		src="<%=basePath%>views/js/bootstrap.min.js"></script>
	<%-- <script type="text/javascript" src="<%=basePath%>views/js/icheck.min.js"></script> --%>
	<script type="text/javascript" src="<%=basePath%>views/js/layer.m.js"></script>
	<script type="text/javascript" src="<%=basePath%>views/js/json2.js"></script>
	<script type="text/javascript"
		src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script type="text/javascript" src="<%=basePath%>views/js/sha1.js"></script>
	<script type="text/javascript" src="<%=basePath%>views/js/CommonJS.js"></script>
	<script type="text/javascript"
		src="<%=basePath%>views/js/WeiXin/WeChatJS-SDK.js"></script>
	<%-- <script type="text/javascript"
		src="<%=basePath%>views/js/OrderCenter/OrderPayment.js"></script>
	<!-- // 纯JS省市区三级联动 -->
	<script type="text/javascript"
		src="<%=basePath%>views/js/jsAddresss.js"></script> --%>

</body>
<script type="text/javascript">
	function pay() {
		var index = layer.open({
			type : 2,
			content : '请稍后...'
		});
		$.ajax({
			url : "../mobile/payConfig",
			data : {
				ordertitle : $("#ordertitle").val(),
				total : $("#sumPrice").val()
			},
			dataType : "json",
			success : function(jsapi) {
				/* alert(JSON.stringify(jsapi)) */
				layer.close(index);
				if (jsapi.error == "1111") {
					layer.open({
						title : '提示',
						content : jsapi.information
					});
					return false;
				} else {
					WeixinJSBridge.invoke('getBrandWCPayRequest', {
						"appId" : jsapi.appId, // 公众号名称，由商户传入
						"timeStamp" : jsapi.timeStamp, // 时间戳，自1970 年以来的秒数
						"nonceStr" : jsapi.nonceStr, // 随机串
						"package" : jsapi.package, // 预支付ID
						"signType" : jsapi.signType, // 微信签名方式:
						"paySign" : jsapi.paySign
					// 微信签名
					}, function(res) {
						if (res.err_msg == "get_brand_wcpay_request:ok") {
							layer.open({
								title : '提示',
								content : '支付成功'
							});
							location.href = "../mobile/home";
						}
					});
				}
			}
		});
	}
</script>
</html>
